package org.example.designPattern.creation.factory.v2;

import org.example.designPattern.creation.factory.Piz;
import org.example.designPattern.creation.factory.SimpleFactory;

public class PizzaStoreV2 {
    private SimpleFactory factory;

    public PizzaStoreV2() {
    }

    public PizzaStoreV2(SimpleFactory factory) {
        this.factory = factory;
    }

    public Piz getPizza(String type){
        Piz pizza = factory.createPizza(type);
        return pizza;
    }
}
